package com.ruoyi.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.domain.ExShareDocuments;
import com.ruoyi.mapper.ExShareDocumentsMapper;
import com.ruoyi.service.IExShareDocumentsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 文档共享Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-08-28
 */
@Service
public class ExShareDocumentsServiceImpl implements IExShareDocumentsService
{
    @Autowired
    private ExShareDocumentsMapper exShareDocumentsMapper;

    /**
     * 查询文档共享
     * 
     * @param id 文档共享主键
     * @return 文档共享
     */
    @Override
    public ExShareDocuments selectExShareDocumentsById(Long id)
    {
        return exShareDocumentsMapper.selectExShareDocumentsById(id);
    }

    /**
     * 查询文档共享列表
     * 
     * @param exShareDocuments 文档共享
     * @return 文档共享
     */
    @Override
    public List<ExShareDocuments> selectExShareDocumentsList(ExShareDocuments exShareDocuments)
    {
        return exShareDocumentsMapper.selectExShareDocumentsList(exShareDocuments);
    }

    /**
     * 新增文档共享
     * 
     * @param exShareDocuments 文档共享
     * @return 结果
     */
    @Override
    public int insertExShareDocuments(ExShareDocuments exShareDocuments)
    {
        exShareDocuments.setCreateTime(DateUtils.getNowDate());
        return exShareDocumentsMapper.insertExShareDocuments(exShareDocuments);
    }

    /**
     * 修改文档共享
     * 
     * @param exShareDocuments 文档共享
     * @return 结果
     */
    @Override
    public int updateExShareDocuments(ExShareDocuments exShareDocuments)
    {
        return exShareDocumentsMapper.updateExShareDocuments(exShareDocuments);
    }

    /**
     * 批量删除文档共享
     * 
     * @param ids 需要删除的文档共享主键
     * @return 结果
     */
    @Override
    public int deleteExShareDocumentsByIds(Long[] ids)
    {
        return exShareDocumentsMapper.deleteExShareDocumentsByIds(ids);
    }

    /**
     * 删除文档共享信息
     * 
     * @param id 文档共享主键
     * @return 结果
     */
    @Override
    public int deleteExShareDocumentsById(Long id)
    {
        return exShareDocumentsMapper.deleteExShareDocumentsById(id);
    }
}
